﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Pageparkproject
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(
                name: "Tintuc",
                url: "MucTintuc/{id}",
                defaults: new { controller = "News", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "CTTintuc",
                url: "Tintuc/{id}",
                defaults: new { controller = "News", action = "NewsDetail", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "ChitietDuan",
                url: "Thongtinproject/{id}",
                defaults: new { controller = "Project", action = "ProjectDetail", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Duan",
                url: "Project/{id}",
                defaults: new { controller = "Project", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Lienhe",
                url: "Lienhe",
                defaults: new { controller = "Contact", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Gioithieu",
                url: "Gioithieu",
                defaults: new { controller = "Home", action = "About", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}